package com.springapp.utils;

import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Properties;

public class DebugUtil {
	
	
	public String getDebugOff() {
		Properties p = new Properties();
		try {
			 String classpath=System.getProperty("user.dir");
			 String path=classpath+File.separator+"agent";
	         InputStream in = new BufferedInputStream (new FileInputStream(path+File.separator+"jdbc.properties"));
	         p.load(in);
	         System.out.println(path+File.separator+"jdbc.properties");
	             
	        } catch (Exception e) {
	            e.printStackTrace();
	        }
		
		String debug=null;
		try {
			if(p.getProperty("debug")!=null&&p.getProperty("debug")!=""){
				
				debug=p.getProperty("debug").trim();
			}
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			
		}
		
		return debug;
		
	}

}
